package edu.ccdb.irods.dataType;

import java.util.Date;

public class IRODSFileString {
	
	private String absolutePath;
	private String name;
	private Boolean isDirectory = null;
	private Long length;
	private Date lastModifiedDate;
	
	public IRODSFileString (String abolute, String name, Boolean isDirectory ) {
		this.absolutePath = abolute.trim();
		this.name = name.trim();
		this.length = new Long (0);	// default
		
		this.isDirectory = isDirectory; 
	}
	
	public String toString () {
		return name;
	}
	
	public Date getLastModifiedDate() {
		return lastModifiedDate;
	}

	public void setLastModifiedDate(Date lastModifiedDate) {
		this.lastModifiedDate = lastModifiedDate;
	}

	public Long getLength() {
		return length;
	}

	public void setLength(Long length) {
		this.length = length;
	}

	public void setIsDirectory (Boolean isDirectory) {
		this.isDirectory = isDirectory;
	}
	
	public boolean isDirectory() {
		return isDirectory;
	}
	
	public boolean isFile() {
		return !isDirectory;
	}

	public String getAbsolutePath() {
		return absolutePath;
	}

	public void setAbsolutePath(String absolutePath) {
		this.absolutePath = absolutePath;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}

